import { createWebHistory, createRouter, type RouteRecordRaw } from 'vue-router'
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Dashboard',
    component: () => import('@/layout/Dashboard.vue'),
    redirect: '/home',
    meta: {
      title: '首页',
      icon: 'HomeFilled',
      showInMenu: true,
    },
    children: [
      {
        path: 'home',
        name: 'Home',
        component: () => import('@/layout/Home.vue'),
        meta: {
          title: '整体态势分析',
          icon: 'icon-situation',
          showInMenu: true,
        },
      },
      {
        path: 'situation',
        name: 'Situation',
        component: () => import('@/layout/BattleSituation.vue'),
        meta: {
          title: '战场态势分析',
          icon: 'icon-situation',
          showInMenu: true,
        },
      },
      {
        path: 'satellite/:id',
        name: 'Satellite',
        component: () => import('@/views/cesium/EquipmentProfileDetailWX.vue'),
        meta: {
          title: '卫星画像',
          icon: 'icon-situation',
          showInMenu: true,
        },
      },
    ],
  },
]

const router = createRouter({
  history: createWebHistory(import.meta.env.VITE_BASE_ROUTER),
  routes: routes,
})

export default router
